package com.qfedu.knowledge.util;

import java.util.List;

/**
 * @ClassName ListUtils
 * @Author ykx
 * @Date 2024/5/9 16:28
 * @Version 1.0
 */
public class ListUtils {
    /**
     * 判断集合长度是否一致
     *
     * @param collections collections
     * @return boolean
     */
    public static boolean isSameLength(List... collections) {
        if (collections.length <= 1) {
            return true;
        }
        int size = collections[0].size();
        for (int i = 1; i < collections.length; i++) {
            if (collections[i].size() != size) {
                return false;
            }
        }
        return true;
    }
}
